import request from '@/config/axios'
import {ReviewApplyInfoDto} from "@/api/recruit/reviewApply/types";

// 招生资格审查申请 VO
export interface ReviewApplyVO {
  id: string // 批次id
  batchName: string // 批次名称
  year: string // 年份
  applyTemplateUrl: string // 申请表模板地址
  applyStartTime: number // 申请开始时间
  applyEndTime: number // 申请结束时间
  reviewStartTime: number // 审核开始时间
  reviewEndTime: number // 审核结束时间
}

// 招生资格审查申请 API
export const ReviewApplyApi = {
  // 获取批次列表(包括申请状态)
  getReviewBatchList: async (params: any) => {
    return await request.get({
      url: `/recruit/review-batch/review-list`,
      params
    })
  },

  // 招生资格审查申请
  apply: async (data: ReviewApplyInfoDto) => {
    return await request.post({
      url: `/recruit/review-detail/apply`,
      data
    })
  },

  // 查询当前导师指定批次的申请信息
  getApplyInfo: async (batchId: string) => {
    return await request.get({
      url: `/recruit/review-detail/page`,
      params: { batchId, pageNo: 1, pageSize: 1 }
    })
  },

  // 查询当前导师的信息
  getCurrentMentorInfo: async () => {
    return await request.get({
      url: `/recruit/review-detail/base-information`,
    })
  }
}
